package cz.myslivec.knihovna.dao;

import javax.persistence.EntityManager;

import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;

import cz.myslivec.knihovna.entity.BookCopy;

@Name("bookCopyDaoImpl")
@AutoCreate
public class BookCopyDaoImpl implements BookCopyDao {

	@In
	private EntityManager entityManager;

	public void create(BookCopy bookCopy) {
		entityManager.persist(bookCopy);
	}

	public void delete(BookCopy bookCopy) {
		entityManager.remove(bookCopy);
	}

	public void update(BookCopy bookCopy) {
		entityManager.merge(bookCopy);
	}

	public BookCopy getBookCopy(long id) {
		return null;
	}

}
